(0) Obligation:

The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

loop(Cons(x, xs), Nil, pp, ss) → False
loop(Cons(x', xs'), Cons(x, xs), pp, ss) → loop[Ite](!EQ(x', x), Cons(x', xs'), Cons(x, xs), pp, ss)
loop(Nil, s, pp, ss) → True
match1(p, s) → loop(p, s, p, s)

The (relative) TRS S consists of the following rules:

!EQ(S(x), S(y)) → !EQ(x, y)
!EQ(0, S(y)) → False
!EQ(S(x), 0) → False
!EQ(0, 0) → True
loop[Ite](False, p, s, pp, Cons(x, xs)) → loop(pp, xs, pp, xs)
loop[Ite](True, Cons(x', xs'), Cons(x, xs), pp, ss) → loop(xs', xs, pp, ss)

Rewrite Strategy: INNERMOST

(1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed relative TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

loop(Cons(x, xs), Nil, pp, ss) → False [1]
loop(Cons(x', xs'), Cons(x, xs), pp, ss) → loop[Ite](!EQ(x', x), Cons(x', xs'), Cons(x, xs), pp, ss) [1]
loop(Nil, s, pp, ss) → True [1]
match1(p, s) → loop(p, s, p, s) [1]
!EQ(S(x), S(y)) → !EQ(x, y) [0]
!EQ(0, S(y)) → False [0]
!EQ(S(x), 0) → False [0]
!EQ(0, 0) → True [0]
loop[Ite](False, p, s, pp, Cons(x, xs)) → loop(pp, xs, pp, xs) [0]
loop[Ite](True, Cons(x', xs'), Cons(x, xs), pp, ss) → loop(xs', xs, pp, ss) [0]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

loop(Cons(x, xs), Nil, pp, ss) → False [1]
loop(Cons(x', xs'), Cons(x, xs), pp, ss) → loop[Ite](!EQ(x', x), Cons(x', xs'), Cons(x, xs), pp, ss) [1]
loop(Nil, s, pp, ss) → True [1]
match1(p, s) → loop(p, s, p, s) [1]
!EQ(S(x), S(y)) → !EQ(x, y) [0]
!EQ(0, S(y)) → False [0]
!EQ(S(x), 0) → False [0]
!EQ(0, 0) → True [0]
loop[Ite](False, p, s, pp, Cons(x, xs)) → loop(pp, xs, pp, xs) [0]
loop[Ite](True, Cons(x', xs'), Cons(x, xs), pp, ss) → loop(xs', xs, pp, ss) [0]

The TRS has the following type information:
loop :: Cons:Nil → Cons:Nil → Cons:Nil → Cons:Nil → False:True
Cons :: S:0 → Cons:Nil → Cons:Nil
Nil :: Cons:Nil
False :: False:True
loop[Ite] :: False:True → Cons:Nil → Cons:Nil → Cons:Nil → Cons:Nil → False:True
!EQ :: S:0 → S:0 → False:True
True :: False:True
match1 :: Cons:Nil → Cons:Nil → False:True
S :: S:0 → S:0
0 :: S:0

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


loop
match1

(c) The following functions are completely defined:

!EQ
loop[Ite]

Due to the following rules being added:

!EQ(v0, v1) → null_!EQ [0]
loop[Ite](v0, v1, v2, v3, v4) → null_loop[Ite] [0]

And the following fresh constants:

null_!EQ, null_loop[Ite]

(6) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

loop(Cons(x, xs), Nil, pp, ss) → False [1]
loop(Cons(x', xs'), Cons(x, xs), pp, ss) → loop[Ite](!EQ(x', x), Cons(x', xs'), Cons(x, xs), pp, ss) [1]
loop(Nil, s, pp, ss) → True [1]
match1(p, s) → loop(p, s, p, s) [1]
!EQ(S(x), S(y)) → !EQ(x, y) [0]
!EQ(0, S(y)) → False [0]
!EQ(S(x), 0) → False [0]
!EQ(0, 0) → True [0]
loop[Ite](False, p, s, pp, Cons(x, xs)) → loop(pp, xs, pp, xs) [0]
loop[Ite](True, Cons(x', xs'), Cons(x, xs), pp, ss) → loop(xs', xs, pp, ss) [0]
!EQ(v0, v1) → null_!EQ [0]
loop[Ite](v0, v1, v2, v3, v4) → null_loop[Ite] [0]

The TRS has the following type information:
loop :: Cons:Nil → Cons:Nil → Cons:Nil → Cons:Nil → False:True:null_!EQ:null_loop[Ite]
Cons :: S:0 → Cons:Nil → Cons:Nil
Nil :: Cons:Nil
False :: False:True:null_!EQ:null_loop[Ite]
loop[Ite] :: False:True:null_!EQ:null_loop[Ite] → Cons:Nil → Cons:Nil → Cons:Nil → Cons:Nil → False:True:null_!EQ:null_loop[Ite]
!EQ :: S:0 → S:0 → False:True:null_!EQ:null_loop[Ite]
True :: False:True:null_!EQ:null_loop[Ite]
match1 :: Cons:Nil → Cons:Nil → False:True:null_!EQ:null_loop[Ite]
S :: S:0 → S:0
0 :: S:0
null_!EQ :: False:True:null_!EQ:null_loop[Ite]
null_loop[Ite] :: False:True:null_!EQ:null_loop[Ite]

Rewrite Strategy: INNERMOST

(7) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

loop(Cons(x, xs), Nil, pp, ss) → False [1]
loop(Cons(S(x''), xs'), Cons(S(y'), xs), pp, ss) → loop[Ite](!EQ(x'', y'), Cons(S(x''), xs'), Cons(S(y'), xs), pp, ss) [1]
loop(Cons(0, xs'), Cons(S(y''), xs), pp, ss) → loop[Ite](False, Cons(0, xs'), Cons(S(y''), xs), pp, ss) [1]
loop(Cons(S(x1), xs'), Cons(0, xs), pp, ss) → loop[Ite](False, Cons(S(x1), xs'), Cons(0, xs), pp, ss) [1]
loop(Cons(0, xs'), Cons(0, xs), pp, ss) → loop[Ite](True, Cons(0, xs'), Cons(0, xs), pp, ss) [1]
loop(Cons(x', xs'), Cons(x, xs), pp, ss) → loop[Ite](null_!EQ, Cons(x', xs'), Cons(x, xs), pp, ss) [1]
loop(Nil, s, pp, ss) → True [1]
match1(p, s) → loop(p, s, p, s) [1]
!EQ(S(x), S(y)) → !EQ(x, y) [0]
!EQ(0, S(y)) → False [0]
!EQ(S(x), 0) → False [0]
!EQ(0, 0) → True [0]
loop[Ite](False, p, s, pp, Cons(x, xs)) → loop(pp, xs, pp, xs) [0]
loop[Ite](True, Cons(x', xs'), Cons(x, xs), pp, ss) → loop(xs', xs, pp, ss) [0]
!EQ(v0, v1) → null_!EQ [0]
loop[Ite](v0, v1, v2, v3, v4) → null_loop[Ite] [0]

The TRS has the following type information:
loop :: Cons:Nil → Cons:Nil → Cons:Nil → Cons:Nil → False:True:null_!EQ:null_loop[Ite]
Cons :: S:0 → Cons:Nil → Cons:Nil
Nil :: Cons:Nil
False :: False:True:null_!EQ:null_loop[Ite]
loop[Ite] :: False:True:null_!EQ:null_loop[Ite] → Cons:Nil → Cons:Nil → Cons:Nil → Cons:Nil → False:True:null_!EQ:null_loop[Ite]
!EQ :: S:0 → S:0 → False:True:null_!EQ:null_loop[Ite]
True :: False:True:null_!EQ:null_loop[Ite]
match1 :: Cons:Nil → Cons:Nil → False:True:null_!EQ:null_loop[Ite]
S :: S:0 → S:0
0 :: S:0
null_!EQ :: False:True:null_!EQ:null_loop[Ite]
null_loop[Ite] :: False:True:null_!EQ:null_loop[Ite]

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

Nil => 0
False => 1
True => 2
0 => 0
null_!EQ => 0
null_loop[Ite] => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' = 1 + y, y >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: x >= 0, z = 1 + x, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
!EQ(z, z') -{ 0 }→ !EQ(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](2, 1 + 0 + xs', 1 + 0 + xs, pp, ss) :|: z'' = pp, xs >= 0, z' = 1 + 0 + xs, z = 1 + 0 + xs', xs' >= 0, z1 = ss, ss >= 0, pp >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + 0 + xs', 1 + (1 + y'') + xs, pp, ss) :|: z'' = pp, xs >= 0, z = 1 + 0 + xs', xs' >= 0, z' = 1 + (1 + y'') + xs, z1 = ss, y'' >= 0, ss >= 0, pp >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + (1 + x1) + xs', 1 + 0 + xs, pp, ss) :|: z'' = pp, xs >= 0, x1 >= 0, z' = 1 + 0 + xs, z = 1 + (1 + x1) + xs', xs' >= 0, z1 = ss, ss >= 0, pp >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](0, 1 + x' + xs', 1 + x + xs, pp, ss) :|: z'' = pp, xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 = ss, ss >= 0, z = 1 + x' + xs', pp >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](!EQ(x'', y'), 1 + (1 + x'') + xs', 1 + (1 + y') + xs, pp, ss) :|: z = 1 + (1 + x'') + xs', z'' = pp, xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, z1 = ss, y' >= 0, ss >= 0, x'' >= 0, pp >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z'' = pp, z1 = ss, ss >= 0, s >= 0, z = 0, z' = s, pp >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, z'' = pp, xs >= 0, x >= 0, z1 = ss, ss >= 0, pp >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(pp, xs, pp, xs) :|: z' = p, z2 = 1 + x + xs, xs >= 0, z = 1, z1 = pp, x >= 0, p >= 0, s >= 0, z'' = s, pp >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(xs', xs, pp, ss) :|: z = 2, xs >= 0, z1 = pp, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', ss >= 0, z'' = 1 + x + xs, z2 = ss, pp >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, v4 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, z2 = v4, v2 >= 0, v3 >= 0
match1(z, z') -{ 1 }→ loop(p, s, p, s) :|: p >= 0, s >= 0, z = p, z' = s

(11) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(12) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
!EQ(z, z') -{ 0 }→ !EQ(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](2, 1 + 0 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + 0 + (z - 1), 1 + (1 + y'') + xs, z'', z1) :|: xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + (1 + x1) + xs', 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](0, 1 + x' + xs', 1 + x + xs, z'', z1) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](!EQ(x'', y'), 1 + (1 + x'') + xs', 1 + (1 + y') + xs, z'', z1) :|: z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(xs', xs, z1, z2) :|: z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(z1, xs, z1, xs) :|: z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 1 }→ loop(z, z', z, z') :|: z >= 0, z' >= 0

(13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ !EQ }
{ loop[Ite], loop }
{ match1 }

(14) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
!EQ(z, z') -{ 0 }→ !EQ(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](2, 1 + 0 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + 0 + (z - 1), 1 + (1 + y'') + xs, z'', z1) :|: xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + (1 + x1) + xs', 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](0, 1 + x' + xs', 1 + x + xs, z'', z1) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](!EQ(x'', y'), 1 + (1 + x'') + xs', 1 + (1 + y') + xs, z'', z1) :|: z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(xs', xs, z1, z2) :|: z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(z1, xs, z1, xs) :|: z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 1 }→ loop(z, z', z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {!EQ}, {loop[Ite],loop}, {match1}

(15) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: !EQ
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(16) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
!EQ(z, z') -{ 0 }→ !EQ(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](2, 1 + 0 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + 0 + (z - 1), 1 + (1 + y'') + xs, z'', z1) :|: xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + (1 + x1) + xs', 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](0, 1 + x' + xs', 1 + x + xs, z'', z1) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](!EQ(x'', y'), 1 + (1 + x'') + xs', 1 + (1 + y') + xs, z'', z1) :|: z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(xs', xs, z1, z2) :|: z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(z1, xs, z1, xs) :|: z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 1 }→ loop(z, z', z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {!EQ}, {loop[Ite],loop}, {match1}
Previous analysis results are:
!EQ: runtime: ?, size: O(1) [2]

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: !EQ
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(18) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
!EQ(z, z') -{ 0 }→ !EQ(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](2, 1 + 0 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + 0 + (z - 1), 1 + (1 + y'') + xs, z'', z1) :|: xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + (1 + x1) + xs', 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](0, 1 + x' + xs', 1 + x + xs, z'', z1) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](!EQ(x'', y'), 1 + (1 + x'') + xs', 1 + (1 + y') + xs, z'', z1) :|: z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(xs', xs, z1, z2) :|: z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(z1, xs, z1, xs) :|: z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 1 }→ loop(z, z', z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {loop[Ite],loop}, {match1}
Previous analysis results are:
!EQ: runtime: O(1) [0], size: O(1) [2]

(19) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(20) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](s, 1 + (1 + x'') + xs', 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](2, 1 + 0 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + 0 + (z - 1), 1 + (1 + y'') + xs, z'', z1) :|: xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + (1 + x1) + xs', 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](0, 1 + x' + xs', 1 + x + xs, z'', z1) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(xs', xs, z1, z2) :|: z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(z1, xs, z1, xs) :|: z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 1 }→ loop(z, z', z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {loop[Ite],loop}, {match1}
Previous analysis results are:
!EQ: runtime: O(1) [0], size: O(1) [2]

(21) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: loop[Ite]
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

Computed SIZE bound using CoFloCo for: loop
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(22) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](s, 1 + (1 + x'') + xs', 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](2, 1 + 0 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + 0 + (z - 1), 1 + (1 + y'') + xs, z'', z1) :|: xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + (1 + x1) + xs', 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](0, 1 + x' + xs', 1 + x + xs, z'', z1) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(xs', xs, z1, z2) :|: z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(z1, xs, z1, xs) :|: z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 1 }→ loop(z, z', z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {loop[Ite],loop}, {match1}
Previous analysis results are:
!EQ: runtime: O(1) [0], size: O(1) [2]
loop[Ite]: runtime: ?, size: O(1) [2]
loop: runtime: ?, size: O(1) [2]

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: loop[Ite]
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 4 + 3·z + 4·z·z2 + 4·z'' + 6·z2 + 8·z22

Computed RUNTIME bound using PUBS for: loop
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 35 + 8·z' + 14·z1 + 8·z12

(24) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](s, 1 + (1 + x'') + xs', 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](2, 1 + 0 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + 0 + (z - 1), 1 + (1 + y'') + xs, z'', z1) :|: xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](1, 1 + (1 + x1) + xs', 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ loop[Ite](0, 1 + x' + xs', 1 + x + xs, z'', z1) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(xs', xs, z1, z2) :|: z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ loop(z1, xs, z1, xs) :|: z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 1 }→ loop(z, z', z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {match1}
Previous analysis results are:
!EQ: runtime: O(1) [0], size: O(1) [2]
loop[Ite]: runtime: O(n2) [4 + 3·z + 4·z·z2 + 4·z'' + 6·z2 + 8·z22], size: O(1) [2]
loop: runtime: O(n2) [35 + 8·z' + 14·z1 + 8·z12], size: O(1) [2]

(25) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(26) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
loop(z, z', z'', z1) -{ 13 + 3·s + 4·s·z1 + 4·xs + 4·y' + 6·z1 + 8·z12 }→ s'' :|: s'' >= 0, s'' <= 2, s >= 0, s <= 2, z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 16 + 4·xs + 4·y'' + 10·z1 + 8·z12 }→ s1 :|: s1 >= 0, s1 <= 2, xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 8 + 4·z' + 10·z1 + 8·z12 }→ s2 :|: s2 >= 0, s2 <= 2, z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 11 + 4·z' + 14·z1 + 8·z12 }→ s3 :|: s3 >= 0, s3 <= 2, z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 9 + 4·x + 4·xs + 6·z1 + 8·z12 }→ s4 :|: s4 >= 0, s4 <= 2, xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 35 + 22·xs + 8·xs2 }→ s6 :|: s6 >= 0, s6 <= 2, z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 35 + 8·xs + 14·z2 + 8·z22 }→ s7 :|: s7 >= 0, s7 <= 2, z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 36 + 22·z' + 8·z'2 }→ s5 :|: s5 >= 0, s5 <= 2, z >= 0, z' >= 0

Function symbols to be analyzed: {match1}
Previous analysis results are:
!EQ: runtime: O(1) [0], size: O(1) [2]
loop[Ite]: runtime: O(n2) [4 + 3·z + 4·z·z2 + 4·z'' + 6·z2 + 8·z22], size: O(1) [2]
loop: runtime: O(n2) [35 + 8·z' + 14·z1 + 8·z12], size: O(1) [2]

(27) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: match1
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(28) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
loop(z, z', z'', z1) -{ 13 + 3·s + 4·s·z1 + 4·xs + 4·y' + 6·z1 + 8·z12 }→ s'' :|: s'' >= 0, s'' <= 2, s >= 0, s <= 2, z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 16 + 4·xs + 4·y'' + 10·z1 + 8·z12 }→ s1 :|: s1 >= 0, s1 <= 2, xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 8 + 4·z' + 10·z1 + 8·z12 }→ s2 :|: s2 >= 0, s2 <= 2, z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 11 + 4·z' + 14·z1 + 8·z12 }→ s3 :|: s3 >= 0, s3 <= 2, z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 9 + 4·x + 4·xs + 6·z1 + 8·z12 }→ s4 :|: s4 >= 0, s4 <= 2, xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 35 + 22·xs + 8·xs2 }→ s6 :|: s6 >= 0, s6 <= 2, z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 35 + 8·xs + 14·z2 + 8·z22 }→ s7 :|: s7 >= 0, s7 <= 2, z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 36 + 22·z' + 8·z'2 }→ s5 :|: s5 >= 0, s5 <= 2, z >= 0, z' >= 0

Function symbols to be analyzed: {match1}
Previous analysis results are:
!EQ: runtime: O(1) [0], size: O(1) [2]
loop[Ite]: runtime: O(n2) [4 + 3·z + 4·z·z2 + 4·z'' + 6·z2 + 8·z22], size: O(1) [2]
loop: runtime: O(n2) [35 + 8·z' + 14·z1 + 8·z12], size: O(1) [2]
match1: runtime: ?, size: O(1) [2]

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: match1
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 36 + 22·z' + 8·z'2

(30) Obligation:

Complexity RNTS consisting of the following rules:

!EQ(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0
!EQ(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
!EQ(z, z') -{ 0 }→ 1 :|: z' - 1 >= 0, z = 0
!EQ(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
!EQ(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
loop(z, z', z'', z1) -{ 13 + 3·s + 4·s·z1 + 4·xs + 4·y' + 6·z1 + 8·z12 }→ s'' :|: s'' >= 0, s'' <= 2, s >= 0, s <= 2, z = 1 + (1 + x'') + xs', xs >= 0, z' = 1 + (1 + y') + xs, xs' >= 0, y' >= 0, z1 >= 0, x'' >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 16 + 4·xs + 4·y'' + 10·z1 + 8·z12 }→ s1 :|: s1 >= 0, s1 <= 2, xs >= 0, z - 1 >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 8 + 4·z' + 10·z1 + 8·z12 }→ s2 :|: s2 >= 0, s2 <= 2, z' - 1 >= 0, x1 >= 0, z = 1 + (1 + x1) + xs', xs' >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 11 + 4·z' + 14·z1 + 8·z12 }→ s3 :|: s3 >= 0, s3 <= 2, z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0
loop(z, z', z'', z1) -{ 9 + 4·x + 4·xs + 6·z1 + 8·z12 }→ s4 :|: s4 >= 0, s4 <= 2, xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z1 >= 0, z = 1 + x' + xs', z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 2 :|: z1 >= 0, z' >= 0, z = 0, z'' >= 0
loop(z, z', z'', z1) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z1 >= 0, z'' >= 0, z' = 0
loop[Ite](z, z', z'', z1, z2) -{ 35 + 22·xs + 8·xs2 }→ s6 :|: s6 >= 0, s6 <= 2, z2 = 1 + x + xs, xs >= 0, z = 1, x >= 0, z' >= 0, z'' >= 0, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 35 + 8·xs + 14·z2 + 8·z22 }→ s7 :|: s7 >= 0, s7 <= 2, z = 2, xs >= 0, x' >= 0, xs' >= 0, x >= 0, z' = 1 + x' + xs', z2 >= 0, z'' = 1 + x + xs, z1 >= 0
loop[Ite](z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
match1(z, z') -{ 36 + 22·z' + 8·z'2 }→ s5 :|: s5 >= 0, s5 <= 2, z >= 0, z' >= 0

Function symbols to be analyzed:
Previous analysis results are:
!EQ: runtime: O(1) [0], size: O(1) [2]
loop[Ite]: runtime: O(n2) [4 + 3·z + 4·z·z2 + 4·z'' + 6·z2 + 8·z22], size: O(1) [2]
loop: runtime: O(n2) [35 + 8·z' + 14·z1 + 8·z12], size: O(1) [2]
match1: runtime: O(n2) [36 + 22·z' + 8·z'2], size: O(1) [2]

(31) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(32) BOUNDS(1, n^2)